<template>
  <div class="footer">
    <ul class="footer-in">
      <li :class="{active:$route.path == '/home'}" @click="$router.push('/home')">
        <div class="iconfont icon-shouye"></div>
        <p>首页</p>
      </li>
      <li :class="{active:$route.path == '/category'}" @click="$router.push('/category')">
        <div class="iconfont icon-yingyongzhongxin"></div>
        <p>分类</p>
      </li>
      <li :class="{active:$route.path == '/shop'}" @click="$router.push('/shop')">
        <div class="iconfont icon-gouwuche"></div>
        <p>购物车</p>
      </li>
      <li :class="{active:$route.path == '/main'}" @click="$router.push('/main')">
        <div class="iconfont icon-31wode"></div>
        <p>我的</p>
      </li>
      
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  }
};
</script>
 
<style lang = "less" scoped>
@import "../assets/basic.less";
.footer {
  height: 50px;
  width: 100%;
  background-color: #f6f6f6;
  position: fixed;
  bottom: 0;
  left: 0;
  .footer-in {
    height: 50px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    li {
      text-align: center;
      font-weight: bold;
      .iconfont {
        font-size: 24px;
      }
      p {
        margin-top: 3px;
        font-size: 14px;
        color: #666666;
      }
      &.active {
        color: #ff5777;
      }
    }
  }
}
</style>